using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ClassInterface, Guid("96da343e-ff2d-4ed4-b1b3-d4e16d3a367b"), ProgId("BMC.ARSystem.QueryMenu")]
	public class QueryMenu : Menu
	{
		[ARStructMemTypeInfo(Name = "form", Offset = 0u)]
		private string _form;
		[ARStructMemTypeInfo(Name = "server", Offset = 1u)]
		private string _server;
		[ARStructMemTypeInfo(Name = "qualification", Offset = 2u)]
		private string _qualification;
		[ARStructMemTypeInfo(Name = "labelFieldss", Offset = 3u)]
		private ArrayList _labelFields;
		[ARStructMemTypeInfo(Name = "valueField", Offset = 4u)]
		private uint _valueField;
		[ARStructMemTypeInfo(Name = "sortOnLabel", Offset = 5u)]
		private bool _sortOnLabel;
		[ARStructMemTypeInfo(Name = "sampleForm", Offset = 6u)]
		private string _sampleForm;
		[ARStructMemTypeInfo(Name = "sampleServer", Offset = 7u)]
		private string _sampleServer;
		public string Form
		{
			get
			{
				return this._form;
			}
			set
			{
				this._form = value;
			}
		}
		public string Server
		{
			get
			{
				return this._server;
			}
			set
			{
				this._server = value;
			}
		}
		public string Qualification
		{
			get
			{
				return this._qualification;
			}
			set
			{
				this._qualification = value;
			}
		}
		public ArrayList LabelFields
		{
			get
			{
				return this._labelFields;
			}
			set
			{
				this._labelFields = value;
			}
		}
		public uint ValueField
		{
			get
			{
				return this._valueField;
			}
			set
			{
				this._valueField = value;
			}
		}
		public bool SortOnLabel
		{
			get
			{
				return this._sortOnLabel;
			}
			set
			{
				this._sortOnLabel = value;
			}
		}
		public string SampleForm
		{
			get
			{
				return this._sampleForm;
			}
			set
			{
				this._sampleForm = value;
			}
		}
		public string SampleServer
		{
			get
			{
				return this._sampleServer;
			}
			set
			{
				this._sampleServer = value;
			}
		}
		public QueryMenu()
		{
		}
		internal QueryMenu(object[] rawData, Server server) : base(rawData, server)
		{
			rawData = (object[])Util.GetAt(rawData, new int[]
			{
				5,
				1
			});
			object arg_2F_0 = rawData;
			int[] indexSpec = new int[1];
			this.Form = (string)Util.GetAt(arg_2F_0, indexSpec);
			this.Server = (string)Util.GetAt(rawData, new int[]
			{
				1
			});
			this.SampleForm = (string)Util.GetAt(rawData, new int[]
			{
				6
			});
			this.SampleServer = (string)Util.GetAt(rawData, new int[]
			{
				7
			});
			this.Qualification = server.FormatQualification((this.Form.StartsWith("$") && this.Form.EndsWith("$")) ? this.SampleForm : this.Form, Util.GetAt(rawData, new int[]
			{
				2
			}));
			this.LabelFields = ARTypeMgr.Instance.ArrayListFromVariant(Type.GetType("System.UInt32"), (object[])Util.GetAt(rawData, new int[]
			{
				3
			}), server);
			this.ValueField = (uint)Util.GetAt(rawData, new int[]
			{
				4
			});
			this.SortOnLabel = (Convert.ToInt32(Util.GetAt(rawData, new int[]
			{
				5
			})) != 0);
		}
	}
}
